#pragma once
#include "hgeparticle.h"
#include "pyhgeSprite.h"
typedef struct {
	PyObject_HEAD
	hgeParticleSystemInfo * psi;
	hgeParticleSystemInfo hold_psi;
	pySprite * sprite;
	PyObject * refobj;//for bind psi
} pyParticleSystemInfo;
extern PyTypeObject ParticleSystemInfoType;

extern int
pyInitParticleSystemInfo(PyObject * mod);//return 0 for success

extern pyParticleSystemInfo *
pyNewParticleSystemInfo(hgeParticleSystemInfo * ppsi,pySprite * sprite = NULL);

extern int
pyParticleSystemInfo_AttachSprite(PyObject * self,pySprite * sprite,bool updateRealInfo=false);

/*
Bind the psi
Read or write to the member of ParticleSystemInfo object will modify the 'hgeParticleSystemInfo* psi'.
The life of memory 'psi' point to,should be as long as refobj.
*/
extern int
pyParticleSystemInfo_BindInfo(PyObject * self,hgeParticleSystemInfo * psi,PyObject * refobj);